/**
 * Implementations of
 * {@link org.apache.wicket.authorization.IAuthorizationStrategy} and
 * {@link org.apache.wicket.authorization.IUnauthorizedComponentInstantiationListener}
 * . <h2>Sample Usage:</h2> <a name="customSession" /><h4>Define a custom
 * session</h3> <code><pre>
 * public class CustomSession extends WebSession {
 * 
 *     private Collection&lt;Role&gt; roles;
 *     private String user;
 * 
 *     public CustomSession(final Request request) {
 *         super(request);
 *     }
 * 
 *     public Collection&lt;Role&gt; getRoles() {
 *         return this.roles;
 *     }
 * 
 *     public String getUser() {
 *         return this.user;
 *     }
 * 
 * }
 * </pre></code>
 * <h3>define a custom login page class</h3> <code><pre>
 * public class LoginPage extends {@link org.apache.wicket.Page Page} {
 *     // ...
 * }
 * </pre></code> <a name="customAnnotation" />
 * <h3>a custom annotation that contains an array of roles</h3> <code><pre>
 * &#64;{@link java.lang.annotation.Target Target}({@link java.lang.annotation.ElementType#TYPE})
 * &#64;{@link java.lang.annotation.Retention}({@link java.lang.annotation.RetentionPolicy#RUNTIME})
 * public &#64;interface Restricted {
 *     Role[] value();
 * }
 * </pre></code>
 * <h3>your roles enumeration</h3> <code><pre>
 * public enum Role {
 *     READ, WRITE, APPEND, EDIT
 * }
 * </pre></code>
 * <h3>Tie it all together in your
 * {@link org.apache.wicket.protocol.http.WebApplication WebApplication}
 * subclass</h3> <code><pre>
 * protected void init() {
 * 
 *     final {@link org.apache.wicket.settings.ISecuritySettings ISecuritySettings} securitySettings = this.getSecuritySettings();
 *
 *     // create a ValueResolver that gets required privileges from our <a href="#customAnnotation">custom annotation</a>
 *     final {@link com.google.code.wicket.auth.component.value.resolver.ValueResolver ValueResolver}&lt;Role&gt; valueResolver = 
 *         new {@link com.google.code.wicket.auth.component.value.resolver.annotation.MultiAnnotationValueResolver MultiAnnotationValueResolver}&lt;Restricted, Role&gt;(
 *             Restricted.class, 
 *             {@link  com.google.code.wicket.auth.component.value.resolver.annotation.MultiAnnotationValueRetrievalStrategy#forAnnotation(Class, Class) MultiAnnotationValueRetrievalStrategy.forAnnotation}(
 *                     Restricted.class, Role.class));
 *                     
 *     // create a ValueProvider that gets available privileges from our <a href="#customSession">custom session</a>
 *     final {@link com.google.code.wicket.auth.component.value.provider.session.SessionBasedMultiValueProvider SessionBasedMultiValueProvider}&lt;CustomSession, Role&gt; valueProvider = new {@link com.google.code.wicket.auth.component.value.provider.session.SessionBasedMultiValueProvider SessionBasedMultiValueProvider}&lt;CustomSession, Role&gt;() {
 * 
 *         &#64;Override
 *         public Collection&lt;Role&gt; getPrivileges(final CustomSession session) {
 *             return session.getRoles();
 *         }
 * 
 *         &#64;Override
 *         public boolean isLoggedIn(final CustomSession session) {
 *             return session.getUser() != null;
 *         }
 *     };
 *     
 *     // define what will be done with unauthorized components (hide them)
 *     final {@link com.google.code.wicket.auth.component.marker.Marker Marker}&lt;Role&gt; componentMarker = new {@link com.google.code.wicket.auth.component.marker.SessionBasedComponentHideMarker SessionBasedComponentHideMarker}&lt;CustomSession, Role, LoginPage&gt;(
 *             valueProvider, Role.class, LoginPage.class);
 *     
 *     // install the strategy that ties all of this together
 *     final {@link org.apache.wicket.authorization.IAuthorizationStrategy IAuthorizationStrategy} strategy = new {@link com.google.code.wicket.auth.component.strategy.ComponentClassAuthorizationStrategy ComponentClassAuthorizationStrategy}&lt;Role&gt;(
 *             valueResolver, valueProvider, componentMarker, LoginPage.class);
 *     securitySettings.setAuthorizationStrategy(strategy);
 * 
 * }</pre></code>
 */
package com.google.code.wicket.auth.component.strategy;

